package zuoye;

import java.util.Scanner;

public class Guessingdowhile {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        int j =(int) (Math.random()*1000+1);
        int guess;
        do {
            System.out.println("猜吧");
            guess = scanner.nextInt();
            if (guess>j){
                System.out.println("猜大了");
            }else if (guess<j){
                System.out.println("猜小了");
            }else {
            System.out.println("恭喜你猜对了");
        }
    }while (guess!=j);
}
}
